package com.字节流写数据FileOutPutStream;

import java.io.FileOutputStream;
import java.io.IOException;

/*
写数据异常处理
 */
public class Demo04 {
    public static void main(String[] args)  {
        FileOutputStream fileOutputStream=null;
        try {
            fileOutputStream = new FileOutputStream("world.txt");
            fileOutputStream.write("Demo04".getBytes());
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {
                fileOutputStream.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
